package com.bpc.cs.dao;

import java.util.List;

import com.bpc.cs.dto.RuleDTO;
import com.bpc.cs.dto.SchemeDTO;

/**
 * @author   phan_tp
 * @datetime Nov 30, 2012 : 4:50:15 PM
 */
public interface ISchemeDAO {

	/**
	 * Get all Scheme record
	 * @return ArrayList<ScoringSchemeDTO>
	 */
	public List<SchemeDTO> selectAllScheme();

	/**
	 * Insert Scheme record
	 * @param SchemeDTO schemeDTO
	 * @return boolean TRUE : Insert successfully
	 * 				   FALSE: Insert failed
	 */
	public boolean insertScheme(SchemeDTO schemeDTO);

	/**
	 * Update Scheme record
	 * @param SchemeDTO schemeDTO
	 * @return boolean TRUE : Update successfully
	 * 				   FALSE: Update failed
	 */
	public boolean updateScheme(SchemeDTO schemeDTO);

	/**
	 * Delete Scheme record
	 * @param int schemeID
	 * @return boolean TRUE : Delete successfully
	 * 				   FALSE: Delete failed
	 */
	public boolean deleteScheme(int schemeID);

	/**
	 * Select list rule by SchemeID
	 * @param int schemeID
	 * @return List<RuleDTO>
	 */
	public List<RuleDTO> selectRuleBySchemeByID(int schemeID);

	/**
	 * Count the number of rule of a scheme
	 * @param int schemeID
	 * @return int
	 */
	public int countRuleOfSchemeID(int schemeID);

	/**
	 * Check schemeName is duplicated or not
	 * @param String schemeName
	 * @return boolean TRUE : schemeName is duplicated
	 * 				   FALSE: schemeName isn't duplicated
	 */
	public boolean isDuplicatedSchemeName(String schemeName);
}
